
<?php


require_once 'db_conn.php';
header("content-type:text/html;charset=utf-8");
//echo "<pre>";

//print_r($_POST);

$username = $_POST['username'];

$password = md5($_POST['password']);
$logintime = time();

$sql ="
INSERT INTO  user (
 id ,
 account  ,
 password  ,
 login_time 
)
VALUES (
NULL ,  '$username',  '$password',  '$login_time'
);
";
//echo $sql;

//die;

$result = $conn->query($sql);

if($result === fales ){
    echo "数据库操作失败！！！：（";
}else{
       echo "注册成功！";
    header("location: register_1.html");
}
